package compoundDB.core;

import compoundDB.database.enumeration.DataType;

/**
 * This interface will be used to control user feed back on how to map
 * properties during import.
 */
public interface ImportUserDialog
{
	/**
	 * This method will cause the dialog to be displayed, and force the user to
	 * choose how to import the specified property.
	 */
	void display();
	
	/**
	 * This method sets the array of existing properties that the user can
	 * choose to map the new property to.
	 * 
	 * @param properties
	 *            The array of propertie names the new property may be mapped
	 *            to.
	 */
	void setPropertiesMaps(String[] properties);
	
	/**
	 * This method sets the property that needs to be mapped (or alternatively
	 * needs a new column created for it).
	 * 
	 * @param property
	 *            The property name that needs to be mapped.
	 */
	void setProperty(String property);
	
	/**
	 * Gets whether or not a new column should be created.
	 * 
	 * @return True if a new column should be created, else false.
	 */
	boolean isNewcolumn();
	
	/**
	 * Gets the datatype if a new column is selected.
	 * 
	 * @return The datatype of the new column.
	 */
	DataType getNewColumnDatatype();
	
	/**
	 * This method gets the name of the existing property the user decided to
	 * map the new property to.
	 * 
	 * @return The user decided property to map to.
	 */
	String getPropertyMap();
}
